﻿<%@ Control Language="C#" %>
<script runat="server">
    private int cid = 0;
    private int Item_Lang = 1;
    private int Top_size = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        /* 栏目绑定尝试，如果栏目CID值等于0，尝试URL获取CID值 */
        if (Cid == 0)
            Cid = Utils.GetQueryString("cid", 0);
        /* 页面语言绑定 */
        Item_Lang = Utils.GetQueryString("lang", 1);
        /* 产品信息读取与绑定 */
        Product pro = new Product();
        Repeater_List.DataSource = pro.List(Cid, Top_Size, Item_Lang);
        Repeater_List.DataBind();
    }
    /// <summary>
    /// 产品分类ID
    /// </summary>
    public int Cid
    {
        get { return cid; }
        set { cid = value; }
    }

    /// <summary>
    /// 显示数量
    /// </summary>
    public int Top_Size
    {
        get { return Top_size; }
        set { Top_size = value; }
    }
    /// <summary>
    /// 图片后缀标签
    /// </summary>
    private string S_mode = "";
    public string S_Mode
    {
        get { return S_mode; }
        set { S_mode = value; }
    }
</script>
<ul class="products_<%=Cid %>">
<asp:Repeater runat="server" ID="Repeater_List">
    <ItemTemplate>
        <li class="item" id="Product_<%#Eval("Item_Id") %>" >
            <a target="_blank" href="Product-View.aspx?id=<%#Eval("Item_Id") %>&lang=<%=Item_Lang %>">
                <img alt="<%#Eval("Item_Name") %>" src="../DataFile/Product/<%#Eval("Create_Time","{0:yyyyMM}") %>/<%#Eval("Create_Time","{0:ddHHmmss}") %><%=S_Mode %>.jpg" />
                <span><%#Eval("Item_Name") %></span>
                <p><%#Eval("Item_Instructions") %></p>
                <i><%=Lang.Show("Item_Price")%> : <b><%#Eval("Item_Price") %> </b> <%=Lang.Show("RMB")%></i>
                <code>No:<%#Eval("Item_Id") %></code>
             </a>
            
        </li></ItemTemplate>
</asp:Repeater>
</ul>
